<html>
<head>
<link rel="stylesheet" type="text/css" href="/static/styles.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="/static/scripts.js"></script>
</head>
<body>
{% include 'top.html' %}
	<h1>{{ tournamentName }}</h1>
	<div class="leftDiv">
		<button id="foosAddMatch">Add match</button><br />
		<a href="/">Start</a>
		<a href="/matchStats">Match stats</a>
	</div>
	<div class="centerDiv">
		<div name="newMatchDiv">
			<input id="date" type="text" class="foosPlayer" value="2012-08-31" /> <input
				id="player1" type="text" class="foosPlayer" value="p1" /> <input
				id="player2" type="text" class="foosPlayer" value="p2" /> <input
				id="player3" type="text" class="foosPlayer" value="p3" /> <input
				id="player4" type="text" class="foosPlayer" value="p4" /> <input
				id="score1" type="text" class="foosScore" value="10" /> <input id="score2"
				type="text" class="foosScore" value="0" /> <input id="location" type="text" value="docks" />
			<input id="notes" type="text" class="foosMatchNotes" value="under the table!!!"/>
			<button id="submitMatch">Submit</button>
		</div>
		<table class="matchTable" border="1">
			<tr id="foosFirstRow">
				<td>Date</td>
				<td colspan="2">Team 1</td>
				<td colspan="2">Team 2</td>
				<td>Score 1</td>
				<td>Score 2</td>
				<td>Location</td>
				<td>Notes</td>
				<td></td>
			</tr>
			<tr>
				<td>Date</td>
				<td>Player 1</td>
				<td>Player 2</td>
				<td>Player 3</td>
				<td>Player 4</td>
				<td>10</td>
				<td>4</td>
				<td>ali</td>
				<td></td>
				<td></td>
			</tr>
			<!-- tr>
	<form action="/addMatch">
	<td><input name="date" type="text" /></td>
	<td><input name="player1" type="text" /></td>
	<td><input name="player2" type="text" /></td>
	<td><input name="player3" type="text" /></td>
	<td><input name="player4" type="text" /></td>
	<td><input name="score1" type="text" /></td><td><input name="score2" type="text" /></td>
	<td><input name="notes" type="text" class="foosMatchNotes" /><button id="submitMatch">Submit</button></td>
	</form>
</tr-->
			{% for match in matches %}
			<tr>
				<td>{{ match.date }}</td>
				<td></td>
				<td>Player 2</td>
				<td>Player 3</td>
				<td>Player 4</td>
				<td>{{ match.score1 }}</td>
				<td>{{ match.score2 }}</td>
				<td>{{ match.place }}</td>
				<td>{{ match.notes }}</td>
				<td><a href="/deleteMatch?matchKey={{match.key.id}}"><img src="images/red-cross-md.png" alt="Delete match" width="10" height="10" /></a></td>
			</tr>
			{% endfor %}
		</table>
	</div>
	<div class="rightDiv">
		<h1>Players</h1>
		{% for player in players %}
		{{ player.nickname }}<br />
		{% endfor %}
	</div>
</body>
</html>